import React from 'react'

/* 引入antd */
import { Layout } from 'antd';

/* 引入头部组件 */
import MyHeader from '../../components/layout/MyHeader/MyHeader';
/* 引入侧边栏组件 */
import MyMenu from '../../components/layout/MyMenu/MyMenu';

/* 引入路由 */
import RouterView from '../../router/RouterView';

const { Content } = Layout;

const Home: React.FC<any> = (router: any) => {
    /* console.log('====================================');
    console.log(router);
    console.log('===================================='); */
    return (
        <div className='home'>
            <Layout>
                {/* 头部 */}
                <MyHeader></MyHeader>
                <Layout>
                    {/* 侧边栏 */}
                    <MyMenu></MyMenu>
                    <Layout style={{ padding: '0 24px 24px' }}>
                        {/* 内容区 */}
                        <Content
                            className="site-layout-background"
                            style={{
                                padding: 24,
                                margin: 0,
                                minHeight: 280,
                            }}
                        >
                            <RouterView routes={router.routes}></RouterView>
                        </Content>
                    </Layout>
                </Layout>
            </Layout>
        </div>
    )
}

export default Home;